package com.example.weight.wormHandle.garbageDisposal.onsiteDispose;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.example.weight.R;
import com.example.weight.greenSeasons.compost.duifeiyongdian;
import com.example.weight.navigation.SijiqingCompostNavActivity;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;

public class onsiteDisposeNav extends AppCompatActivity {
    String name, factory;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_onsite_dispose_nav);
        Intent previousIntent = getIntent();
        name = previousIntent.getStringExtra("name");
        factory = previousIntent.getStringExtra("factory");

        TitleBar titleBar = findViewById(R.id.onsiteDisposeNav_titleBar);
        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }

            @Override
            public void onTitleClick(View v) {}

            @Override
            public void onRightClick(View v) {}
        });

    }
    public void turnWormHatching(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormHatching.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnWormIncoming(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormIncoming.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnWormOutcoming(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormOutcoming.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnWormTemp(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormTemp.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnWormSaling(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormSaling.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnEle(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormElectricity.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnCheck(View view) {
        Intent intent =new Intent(onsiteDisposeNav.this, WormDeodorization.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }

    public void turnBrowser(View view){
        Uri uri = Uri.parse("http://39.105.29.195/#/login");
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
    }
}